package cn.conchit.apccontroldemo.graph.po;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;

/**
 * @author hetao
 * @version 1.0
 * @description: TODO
 * @date 2023/2/16 14:51
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value="ctl_cmpt")
public class Cmpt {

    @TableId
    private Integer id;
    private String name;
    private String type;
    private String version;
    private String clazzName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Cmpt cmpt = (Cmpt) o;
        return Objects.equals(id, cmpt.id) && Objects.equals(name, cmpt.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name);
    }
}
